package com.corpdata.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.corpdata.system.org.entity.OrgUser;
import com.corpdata.system.org.service.OrgUserService;
import com.corpdata.system.security.shiro.util.UserUtil;

@Controller
public class IndexController {
	
	@Autowired
	private OrgUserService userService;
	
	@RequestMapping(value={"/index","/"})
	public String index(ModelMap map){
		OrgUser user = userService.findById(UserUtil.getCurrentOrgUser().getId());
		map.put("user", user);
		return "index";
	}
	
	@RequestMapping("/index/post-tool")
	public String postTool(){
		return "system/post_tool";
	}
}
